import  fetchRequest from '@/util/fetch'
const SERVICE = "/blade-meiye"

export const listProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/list',
        method: 'get',
        params: params,
    })
}

export const listMeiYeShop = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeShop/list',
        method: 'get',
        params: params,
    })
}

export const detailMeiYeShop = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeShop/detail',
        method: 'get',
        params: params,
    })
}

export const detailMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/detail',
        method: 'get',
        params: params,
    })
}

export const listMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/list',
        method: 'get',
        params: params,
    })
}

export const listMeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeGroup/project',
        method: 'get',
        params: params,
    })
}

export const workerMeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeGroup/worker',
        method: 'get',
        params: params,
    })
}

export const detailMeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/detail',
        method: 'get',
        params: params,
    })
}

export const saveComment = (data={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/comment/save',
        method: 'post',
        data: data,
    })
}

export const uncollectmeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/uncollect',
        method: 'post',
        params: params,
    })
}

export const collectMeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/collect',
        method: 'post',
        params: params,
    })
}

export const collectMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/collect',
        method: 'post',
        params: params,
    })
}

export const uncollectMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/uncollect',
        method: 'post',
        params: params,
    })
}

export const collectListMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/collectList',
        method: 'get',
        params: params,
    })
}

export const listMeiYeCoupon = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeCoupon/list',
        method: 'get',
        params: params,
    })
}

export const timeScheduleMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/timeSchedule',
        method: 'get',
        params: params,
    })
}
//首页-所有服务
export const allMeiYeProject = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/all',
        method: 'get',
        params: params,
    })
}
//技师列表 Double curLongitude, Double curLatitude 支持当前坐标,接口返回距离
export const listWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/list',
        method: 'get',
        params: params,
    })
}
//推广大师入驻情况,返回的数据为空, 说明没有申请入驻过。如果有数据,只会返回入驻成功,及入驻申请中的数据
export const detailSettle = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeChannel/settle/detail',
        method: 'get',
        params: params,
    })
}

//推广入驻提交
export const settleMeiYeChannel = (data={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeChannel/settle',
        method: 'post',
        data: data,
    })
}
//推广入驻提交
export const isChannelMeiYeChannel = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeChannel/isChannel',
        method: 'get',
        params: params
    })
}
//技师排班
export const scheduleMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeWorker/schedule',
        method: 'get',
        params: params
    })
}

//保存订单
export const saveMeiYeOrder = (data={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/save',
        method: 'post',
        data: data
    })
}

//支付订单
export const payMeiYeOrder = (data={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/pay',
        method: 'post',
        data: data
    })
}
//附近地图
export const aroundRegion = (params={}) => {
    return fetchRequest({
        url: '/blade-system/api/region/around',
        method: 'get',
        params: params
    })
}
//订单列表
export const listMeiYeOrder = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/list',
        method: 'get',
        params: params
    })
}
//订单详情
export const detailMeiYeOrder = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/detail',
        method: 'get',
        params: params
    })
}
//最后一次订单的地址
export const lastOrderAddress = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/lastOrderAddress',
        method: 'get',
        params: params
    })
}
//取消订单
export const cancelOrder = (data={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeOrder/cancel',
        method: 'post',
        data: data
    })
}
//技师加钟项目
export const clockUpAll = (params={}) => {
    return fetchRequest({
        url: SERVICE + '/api/meiYeProject/all/clockUp',
        method: 'get',
        params: params
    })
}
//充值
export const chargeUser = (params={}) => {
    return fetchRequest({
        url: '/blade-system/api/user/charge',
        method: 'get',
        params: params
    })
}
//提交加钟
export const addClockProjectMeiYeOrder = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/addClockProject',
        method: 'post',
        data: data
    })
}
//保存地址
export const saveAddressMeiYeOrder = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/saveAddress',
        method: 'post',
        data: data
    })
}
//订单评价
export const commentMeiYeOrder = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/comment',
        method: 'post',
        data: data
    })
}
//技师评论列表
export const commentListMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeWorker/commentList',
        method: 'get',
        params: params
    })
}
//技师服务项目
export const allProjectMeiYeWorker = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeWorker/project/all',
        method: 'get',
        params: params
    })
}
//获取出行数据
export const getTravelDataMeiYeOrder = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/getTravelData',
        method: 'get',
        params: params
    })
}
//获取订单orderId
export const getOrderBaseData = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/getOrderBaseData',
        method: 'get',
        params: params
    })
}
//下单页面优惠券列表
export const getCouponListMeiYeOrder = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/getCouponList',
        method: 'get',
        params: params
    })
}
//首页banner
export const homeDisplay = (params={}) => {
    return fetchRequest({
        url: '/blade-system/api/systemNotice/homeDisplay',
        method: 'get',
        params: params
    })
}
//删除订单
export const userDeleteMeiYeOrder = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/userDelete',
        method: 'post',
        params: params
    })
}
//意见反馈
export const systemFeedback = (data={}) => {
    return fetchRequest({
        url: '/blade-system/api/systemFeedback/save',
        method: 'post',
        data: data
    })
}
//技师投诉
export const meiYeComplaint = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeComplaint/save',
        method: 'post',
        data: data
    })
}
//申请加盟
export const meiYeSvcProviderApply = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeSvcProviderApply/save',
        method: 'post',
        data: data
    })
}
//投诉列表
export const meiYeComplaintList = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeComplaint/list',
        method: 'get',
        params: params
    })
}
//反馈列表
export const systemFeedbackList = (params={}) => {
    return fetchRequest({
        url: '/blade-system/api/systemFeedback/list',
        method: 'get',
        params: params
    })
}
//项目升级列表
export const upgradeProject = (data={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/upgradeProject',
        method: 'post',
        data: data
    })
}
//项目升级差价
export const upgradeProjectPrice = (params={}) => {
    return fetchRequest({
        url: '/blade-meiye/api/meiYeOrder/upgradeProject/price',
        method: 'get',
        params: params
    })
}

export const homeDisplaySystemNoticeApi = function(params={}) {
    return fetchRequest({
        url: '/blade-system/api/systemNotice/homeDisplay',
        method: 'get',
        params: params
    })
}




 




/*
export const systemFeedbackListFetch = (params:string='',signal:object) => {
    return fetchRequest({
        url: '/blade-system/api/systemFeedback/list',
        method: 'get',
        params: params,
		//signal: signal
    })
}

*/